<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:wh="http://java.sun.com/jsf/composite/webhib">

   <ui:composition template="../template.xhtml">
      <ui:define name="title">
         #{msg.title_login}
      </ui:define>

      <ui:define name="content">

         <div id="login-page" class="useradmin-page">
            <h1 class="page-header">#{msg.header_login}</h1>
            <wh:pageMessage bean="#{auth}"/>

            <h:panelGroup id="login-pane" styleClass="input-pane" layout="block" rendered="#{!auth.authenticated}">
               <h:form id="login-form" prependId="false">
                  <wh:inputField id="username" label="#{msg.field_username}" value="#{auth.userName}" tabindex="1"/>
                  <wh:inputSecret id="password" label="#{msg.field_password}" value="#{auth.passWord}" tabindex="2"/>
                  <wh:buttonPane>
                     <wh:inputButton id="login-button" action="#{auth.logInAction}" label="#{msg.action_login}" tabindex="3"/>
                  </wh:buttonPane>
               </h:form>
               <p><a href="#{request.contextPath}/user/passwordreset" tabindex="5">#{msg.text_forgot_password}</a></p>
               <p><a href="#{request.contextPath}/user/register" tabindex="6">#{msg.text_not_member} #{msg.action_register}</a></p>
            </h:panelGroup>

            <h:panelGroup id="logout-pane" styleClass="input-pane" layout="block" rendered="#{auth.authenticated}">
               <h:form id="logout-form" prependId="false">
                  <wh:buttonPane>
                     <wh:inputButton id="logout-button" action="#{auth.logOutAction}" label="#{msg.action_logout}" tabindex="1"/>
                  </wh:buttonPane>
               </h:form>
            </h:panelGroup>
         </div>

      </ui:define>
   </ui:composition>

</html>

